package com.lzp.test.socket;

import lombok.SneakyThrows;

import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

/**
 * @author : lzp
 * @version 1.0
 * @date : 2022/9/13 10:45
 * @apiNote : TODO
 */
public class Client {
    @SneakyThrows
    public static void main(String[] args) {
        Socket socket = new Socket("localHost",5000);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("hello tcp".getBytes(StandardCharsets.UTF_8));
        socket.close();
    }
}
